package com.zc.study.designPattern.创建型设计模式.singletonPattern;

/**
 * java语言特性产生最好的单例方式
 */
public class TheBestForJava {
    private TheBestForJava(){
    }
    private static class factory{
        private final  static TheBestForJava THE_BEST_FOR_JAVA = new TheBestForJava();
    }
    public static TheBestForJava getInstance(){
        return factory.THE_BEST_FOR_JAVA;
    }
}
